execute store result score #s UUID0 run data get entity @s UUID[0]
tag @e[distance=0..40,tag=player_position] add possible_visible
data modify storage temp Rotation set from entity @s Rotation
execute store result score yr_dif value run data get storage temp Rotation[0]
execute store result score xr_dif value run data get storage temp Rotation[1]
execute if entity @e[tag=possible_visible] run function stealth:detect/loop
data modify entity @s Rotation set from storage temp Rotation
tag @e[tag=possible_visible] remove possible_visible
#execute if entity @e[tag=actual_visible] run function detect:detect_success
tag @e[tag=actual_visible] remove actual_visible